package com.losrebellos.scale {	import flash.display.DisplayObject;	import flash.geom.Point;	import flash.geom.Rectangle;	/*	 *	 * @author los rebellos	 *	 */	public final class Scale 	{		////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		// GET THE SCALED RECTANGLE
		////////////////////////////////////////////////////////////////////////////////////////////////////////////////		public static function getScaledRectangle(fitType:String, positionType:String, rectObject:Rectangle, rectResize:Rectangle):Rectangle		{			// get scaled rectangle & point			var fittedRect:Rectangle = Fit.getFittedRectangle(fitType, rectObject, rectResize);			var positionedPoint:Point = Position.getPositionedPoint(positionType, fittedRect, rectResize);						// merge & return the rect			fittedRect.x = positionedPoint.x;			fittedRect.y = positionedPoint.y;			return fittedRect;		}						////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		// SET THE SCALED RECTANGLE
		////////////////////////////////////////////////////////////////////////////////////////////////////////////////		public static function setScaledRectangle(fitType:String, positionType:String, rectObject:Rectangle, rectResize:Rectangle, displayObject:DisplayObject):Rectangle		{			// get scaled rectangle			var result:Rectangle = getScaledRectangle(fitType, positionType, rectObject, rectResize);						// set the position and size			displayObject.x = result.x;			displayObject.y = result.y;			displayObject.width = result.width;			displayObject.height = result.height;						// result			return result;		}	}}